﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using DALayer;
using Model;

namespace DLL
{
    public class BLLShort
    {
        InfoDAL dal = new InfoDAL();


        public  DataTable DataTable(ShortCarShare sc)
        {
            string Route = "";
            if (sc.SGoCity!=""||sc.SDesitionation!="")
            {
                Route = $" and SGoCity='{sc.SGoCity}' and SDesitionation='{sc.SDesitionation}'";
            }
            return dal.DataTable(Route);
        }
        //浏览人数增加
        public int NumberApp(string id)
        {
            return dal.NumberApp(id);
        }





        //长途申请信息查询
        public DataTable DataLong(string id)
        {
            return dal.LongData(id);
        }
        //查询长途申请的信息
        public DataTable ApplyInfo(string LongID, string Statem)
        {

            return dal.ApplyInfo(LongID,Statem);
        }



        //上下班发布的拼车信息查询
        public DataTable ApplyShort(string userID,string States)
        {
            return dal.ApplyShort(userID, States);
        }
        //上下班申请信息查询
        public DataTable ApplyData(string userID, string States)
        {
            return dal.ApplyData(userID, States);
        }
        //上下班详细信息查询
        public DataTable DataShort(string id)
        {
            return dal.DataShort(id);
        }

        public static DataTable DataSelect(string us, string als)
        {
            return InfoDAL.DataSelect(us,als);
        }
        public static DataTable DataSelect2(string us, string als)
        {
            return InfoDAL.DataSelect(us, als);
        }

        //长途申请人信息查询
        public DataTable DataDed(string id)
        {
            return dal.DataDed(id);
        }
        //长途是否同意拼车
        public int LongWheher(string id,string wh)
        {
            return dal.LongWheher(id,wh);
        }

        //上下班申请人信息查询
        public DataTable DataDed2(string id)
        {
            return dal.DataDed2(id);

        }
        //上下班是否同意拼车
        public int ShortWheher(string id,string wh)
        {
            return dal.ShortWheher(id,wh);
        }
    }
}
